#ifndef _MQTT_CLIENT_CORE_H
#define _MQTT_CLIENT_CORE_H

/* forward define class */
class MqttClientSubscribe;
class MqttClientPublish;
class MqttClientCore
{
private:
    /* data */
public:
    explicit MqttClientCore();
    ~MqttClientCore();
public:
    MqttClientPublish* MqttPub;
    MqttClientSubscribe* MqttSub;
    static MqttClientCore* MqttClient;

    typedef struct mosquitto* MosquittoHandl;
    static MqttClientCore* GetInterface();

    short mqtt_client_subscribe(const char* topic);
    void mqtt_cleint_publish(const char* topic, const char* message);
    
    MosquittoHandl create_mosquitto(); 
private:
    class GC {
        public: 
            ~GC() { if (MqttClient) delete MqttClient;};
    };
};

#endif // mqtt_client_core.h
